#!/usr/bin/env python2

def fact(num):
    if num <= 1:
        return 1
    result = num
    while num >= 1:
        num -= 1
        result *= num
    return result

print fact(5)
